Problem Note 64483: The EXPORT procedure does not write out all the variables listed for the KEEP= data set option when the PUTNAMES=NO statement is included
PROC EXPORT does not write out all the variables listed for the KEEP= data set option when the PUTNAMES=NO statement is also used. For example, two variables are listed for the KEEP= data set option, but only one variable is written to the file. Here is a syntax example that can cause this issue; in this case, only the AGE variable is written to the class.csv file:
proc export data=sashelp.class(keep=name age)
outfile='c:\temp\class.csv' dbms=csv replace;
putnames=no;
run;
The workaround is to use the KEEP= data set option in a DATA step prior to PROC EXPORT. Then use PROC EXPORT with the PUTNAMES=NO statement to create an external file that does not include variable names as column names in the first row. Here is the syntax to use for the workaround:
data class;
set sashelp.class (keep=name age);
run;
proc export data=class
outfile='c:\temp\class2.csv' dbms=csv replace;
putnames=no;
run;
A fix for this issue is planned for a future software release.
Operating System and Release Information
SAS System | Base SAS | Microsoft® Windows® for x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Enterprise x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Pro 32-bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8 Pro x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 8.1 Pro x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows 10 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 Datacenter | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 R2 Std | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2012 Std | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2016 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Microsoft Windows Server 2019 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Enterprise 32 bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Enterprise x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Home Premium 32 bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Home Premium x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Professional 32 bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Professional x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Ultimate 32 bit | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Windows 7 Ultimate x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
64-bit Enabled AIX | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
64-bit Enabled Solaris | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
HP-UX IPF | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Linux for x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
Solaris for x64 | 9.4_M6 | 9.4_M6 | 9.4 TS1M6 | 9.4 TS1M7 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Topic: | SAS Reference ==> Procedures ==> EXPORT Common Programming Tasks ==> Reading and Writing External Data ==> with PROC EXPORT
|
Date Modified: | 2020-02-11 10:33:09 |
Date Created: | 2019-07-17 09:41:19 |